package mspbots.autotask.client.core;

import mspbots.autotask.common.QueryBody;

import java.net.URI;

/**
 * mspbots.core.autotask.core.TicketsService
 *
 * @author <a href="https://github.com/vnobo">Alex bob</a>
 * @date Created by 2020/8/4
 */
public interface BaseApiService extends BaseSyncService {

    /**
     * query find all entity
     *
     * @param tenantId  tenant id
     * @param queryBody query find params
     * @param pageUrl   page next url optional
     * @param <T>       return entity class type
     * @return all page model
     */
    <T> T find(Long tenantId, QueryBody queryBody, URI pageUrl);

    /**
     * query find all entity count
     *
     * @param tenantId  tenant id
     * @param queryBody count  params
     * @param <T>       return entity class type
     * @return count return model
     */
    <T> T count(Long tenantId, QueryBody queryBody);

}
